<%@ page language="java" import="java.util.*" pageEncoding="UTF-8"%>
<%
String path = request.getContextPath();
String basePath = request.getScheme()+"://"+request.getServerName()+":"+request.getServerPort()+path+"/";
%>
<%@ taglib uri="http://java.sun.com/jsp/jstl/core"  prefix="c"%>
<!-- 如果要使用shiro的标签来进行权限判断，则必须加上这句话 -->
<%@ tagliburi="http://shiro.apache.org/tags" prefix="shiro" %>
<!DOCTYPE html>
<html>
  <head>
    <base href="<%=basePath%>">
    
    <title>授权测试</title>
	<meta http-equiv="pragma" content="no-cache">
	<meta http-equiv="cache-control" content="no-cache">
	<meta http-equiv="expires" content="0">    
	<meta http-equiv="keywords" content="keyword1,keyword2,keyword3">
	<meta http-equiv="description" content="This is my page">
	
	<link rel="stylesheet" type="text/css"	href="${pageContext.request.contextPath}/js/easyui/demo.css">
	<link rel="stylesheet" type="text/css" href="${pageContext.request.contextPath}/js/easyui/themes/default/easyui.css">
	<link rel="stylesheet" type="text/css" href="${pageContext.request.contextPath}/js/easyui/themes/icon.css">
	<script type="text/javascript"	src="${pageContext.request.contextPath}/js/jquery-1.11.0.min.js"></script>
	<script type="text/javascript" src="${pageContext.request.contextPath}/js/easyui/jquery.easyui.min.js"></script>
  	
  	<script type="text/javascript">
  		function sub(oper){
  			$("#operForm").attr("action","${pageContext.request.contextPath}/item/"+oper+".do");
  			$("#operForm").submit();
  		}
  	</script>
  
  </head>
  
	<body>
		<form action="" id="operForm">
			<shiro:hasPermission name="item:add">
				<input type="button" value="増" onclick="sub('add')"><br>
			</shiro:hasPermission>
			<input type="button" value="删" onclick="sub('delete')"><br>
			<input type="button" value="改" onclick="sub('update')"><br>
			<input type="button" value="查" onclick="sub('query')"><br>
		</form>
	</body>		
</html>
